import Vue from 'vue'
import VueRouter from 'vue-router'

//导入对应的路由组件：
import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import NewsList from './components/News/NewsList.vue'
import NewsInfo from './components/News/NewsInfo.vue'
import imgsList from './components/imgs/imgsList.vue'
import imgsInfo from './components/imgs/imgsInfo.vue'
import goodsList from './components/goods/goodsList.vue'
import goodsInfo from './components/goods/goodsInfo.vue'
import infoDes from './components/goods/infoDes.vue'
import goComment from './components/goods/goComment.vue'




Vue.use(VueRouter)

export default new VueRouter({
  routes: [
    { path: '/', redirect: '/home' },
    { path: '/home', component: HomeContainer },
    { path: '/member', component: MemberContainer },
    { path: '/shopcar', component: ShopcarContainer },
    { path: '/search', component: SearchContainer },
    { path: '/newsList', component: NewsList },
    { path: '/newsInfo/:id', component: NewsInfo },
    { path: '/imgsList', component: imgsList },
    { path: '/imgsInfo/:id', component: imgsInfo },
    { path: '/goodsList', component: goodsList },
    { path: '/goodsInfo/:id', component: goodsInfo },
    { name: 'infoDes', path: '/infoDes/:id', component: infoDes },
    { name: 'goComment', path: '/goComment/:id', component: goComment }
    
  ],
  //覆盖默认的路由高亮的类，默认的类叫做 router-link-active
  linkActiveClass: 'mui-active'
})